package com.lxj.springcloud.entities;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @Author: lxj
 * @Date: 2021.03.25 14:51
 * @version: 1.0
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class CommonResult<T> {
    //状态码
    private Integer code;
    //消息
    private String message;
    //数据 对象
    private T data;
    //定义两个参数的构造方法
    public CommonResult(Integer code, String message) {
//        this.code = code;
//        this.message = message;
        this(code,message,null);
    }
}
